Repository navigation
fix: keep usage reporting off once it is turned off - #286
Merged
Merged
Conversation
FISHE_USAGE_REPORTING_ENABLED was off only for 0/false/no/off: an empty value or any other value (a typo, "disabled") left reporting on. Once set, it is now read through the trace client's allows_reporting and fails closed: only true/on/yes/1 keeps reporting on. Unset still means on. Re-vendors trace-client-python 0.5.0, whose TRACE_USAGE_REPORTING / DO_NOT_TRACK checks fail closed too; the vendored tests are updated to the new rules. Docs updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A server operator reported usage reporting turning itself back on after being disabled. FishE's own switch was fail-open, and that is fixed here along with the vendored client.
FISHE_USAGE_REPORTING_ENABLEDturned reporting off only for0/false/no/off; an empty value, a typo ordisabledleft it on. Once set, it is now read through the client'sallows_reporting: onlytrue/on/yes/1(any case) keeps reporting on, anything else turns it off. Unset still means the default, on.TRACE_USAGE_REPORTINGset to anything but blank or an on-value,DO_NOT_TRACKset to anything but blank or0/false/off/no, or an unreadable environment, now turns reporting off;enabled=is read throughallows_reportingtoo.tests/test_trace_client.py(FishE's copy of the client tests) is updated: the test that pinnedTRACE_USAGE_REPORTING=disabledas not an opt-out now expects it to opt out, and tests forallows_reporting, unclear environment values, an unreadable environment andenabled="false"are added.tests/config/test_config.py: the test pinning empty/anythingas on is replaced by fail-closed cases.src/usageReporting.pydocstring describe the fail-closed rules.Tests
pytest(with the SDL dummy drivers, astest.sh): 1148 passed.🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson